package com.kun.order_web.controller;

import com.kun.api.IOrderService;
import com.kun.pojo.domain.TradeOrder;
import com.kun.pojo.entity.Result;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderWebController {

    @DubboReference
    private IOrderService orderService;

    @RequestMapping("/confirm")
    public Result confirmOrder(@RequestBody TradeOrder tradeOrder) {
        return orderService.confirmOrder(tradeOrder);
    }

}
